home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / qptech.arc / TI391.ASC < prev    next >
Text File  |  1991-04-25  |  15KB  |  595 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  9. VERSION  :  ALL
  10.      OS  :  DOS
  11.    DATE  :  April 18, 1991                 PAGE  :  1/8
  12.  
  13.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  14.  
  15.  
  16.  
  17.  
  18. In every database application, there are several important
  19. components:
  20.  
  21.    1.  The Database block is essential in every database
  22.        operation.  It is the area where all your information is
  23.        located.  Each database block consists of the following:
  24.  
  25.       a.  A row of field names which describe each field in
  26.           your database.  These field names must always be
  27.           located in the first row of your database block,
  28.           just above the first record in your database.  Each
  29.           field name should be unique, no longer than 15
  30.           characters in length, and should not contain
  31.           blanks.  If you wish to add a space between two
  32.           words, use the underscore symbol (_).
  33.  
  34.       b.  The remaining row(s) in your database block are
  35.           record(s).  In a phone list, for example, a record
  36.           would consists of each person's name and phone
  37.           number.
  38.  
  39.       c.  Each column of your database block is a field.
  40.           Field(s) are individual pieces of information that
  41.           fit within a record.  In a phone list, for example,
  42.           one field may be the person's name;  another field
  43.           may be the person's phone number.
  44.  
  45.        If you are linking to an external database file (that is,
  46.        a Paradox, Reflex, or dBASE file which is not currently
  47.        open in a Quattro Pro window), you can specify the
  48.        database block using the following syntax:
  49.        [FILENAME]A1..A2, where FILENAME is the name of the
  50.        external database you wish to query.  This syntax allows
  51.        you to modify records in the external database without
  52.        being forced to redefine your database block each time.
  53.        Note that you cannot do a Locate or Delete on an external
  54.        database, it is read only.  If linking to an external
  55.        spreadsheet database (such as Lotus, Quattro, Symphony, or
  56.        Surpass), you must link to the entire database block (eg.
  57.        [FILENAME]A1..G58]).
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  75. VERSION  :  ALL
  76.      OS  :  DOS
  77.    DATE  :  April 18, 1991                 PAGE  :  2/8
  78.  
  79.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  80.  
  81.  
  82.  
  83.  
  84.    2.  The criteria table is also essential in every database
  85.        application.  It is in the criteria table that you specify
  86.        a set of rules which will determine what records you wish
  87.        to examine in the main database block.  Each criteria
  88.        table consists of the following:
  89.  
  90.       a.  The first row of your criteria table will always
  91.           consist of field names.  These field names must all
  92.           be spelled exactly as they appear in the database
  93.           (use </><Edit><Copy> to copy the field names
  94.           directly from the database into the criteria table;
  95.           this ensures that there will be no typos).  It is
  96.           not necessary to place all of the database's field
  97.           names in the criteria table;  you only need to
  98.           include the field names which contain a criteria
  99.           you are using for your query.
  100.  
  101.       b.  The second row, and any rows following, contain the
  102.           search criteria.    It is here that you can specify
  103.           what rules you wish to adhere to for extracting
  104.           records.    A criteria table must always have at
  105.           least one of these rows in addition to the field
  106.           names.  The search criteria consists of one of the
  107.           following:
  108.  
  109.           o  A Value, such as 25.50.  Quattro Pro will
  110.              look for this value in the field whose name
  111.              is located above the criteria in the first
  112.              row of the criteria table.
  113.  
  114.           o  A Label, such as Cleveland.  The Labels can
  115.              contain wildcards, C* for example would
  116.              query for all labels which begin with the
  117.              letter C.    Quattro Pro will look for this
  118.              label in the field whose name is located
  119.              above the criteria in the first row of the
  120.              criteria table.
  121.  
  122.           o  A Logical Search Formula.    A search formula
  123.              is a logical formula which returns either a
  124.              one or zero, such as +AGE>30.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  141. VERSION  :  ALL
  142.      OS  :  DOS
  143.    DATE  :  April 18, 1991                 PAGE  :  3/8
  144.  
  145.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  146.  
  147.  
  148.  
  149.  
  150.           o  An empty cell, which acts as a place holder,
  151.              and indicates no criteria in this cell (in
  152.              other words, all records).  Note that no row
  153.              in your criteria table should consist of
  154.              only blank cells, because if it does, you
  155.              are telling Quattro Pro to query ALL records
  156.              in the database.
  157.  
  158.    3.  The last component of your database, the output block, is
  159.        only necessary if you are using the database operations
  160.        Extract or Unique.  It is not necessary if you are using
  161.        the Locate or Delete commands.  Each output block consists
  162.        of the following:
  163.  
  164.       a.  The first row contains field names which are taken
  165.           from the field names in the database block.  It is
  166.           not necessary to place all the field names in the
  167.           database block into this table, only the names of
  168.           the fields you wish to extract into the output
  169.           block.  These field names must all be spelled
  170.           exactly as they appear in the database  (use
  171.           </><Edit><Copy> to copy the field names directly
  172.           from the database into the criteria table; this
  173.           ensures that there will be no typos).
  174.  
  175.       b.  Any other rows can be empty, since they are place
  176.           holders for where you wish the extracted data to be
  177.           placed.  If your output block is only one row in
  178.           size, then Quattro Pro will delete everything below
  179.           the output block and place as many of the records
  180.           as it can underneath.  If you wish to prevent this,
  181.           specify an output block with more than one row.
  182.           Quattro Pro will try to fit the extracted records
  183.           into only the block you specify, and will return an
  184.           error message ("Too Many Records For Output Block")
  185.           if they do not all fit.
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  207. VERSION  :  ALL
  208.      OS  :  DOS
  209.    DATE  :  April 18, 1991                 PAGE  :  4/8
  210.  
  211.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  212.  
  213.  
  214.  
  215.  
  216. Trouble Shooting 
  217.  
  218. If you are having problems with your database application, use
  219. the following list to make sure everything is configured
  220. properly.  Databases are very precise, and small mistakes can
  221. produce some pretty strange results.
  222.  
  223. Before running through this list, go into the
  224. </><Database><Query> menu, and jot down the following
  225. information.  It will help you skim the checklist more easily.
  226.  
  227.    1.  The block range defined as the database block
  228.        (</><Database><Query><Block>).
  229.  
  230.    2.  The block range defined as the criteria table
  231.        (</><Database><Query><Criteria Table>).
  232.  
  233.    3.  The block range defined as the output block, if one is
  234.        necessary (</><Database><Query><Output Block>).
  235.  
  236.  
  237. If you are not querying an external database file:
  238.  
  239.    1.  Does the first row of the database contain field names
  240.        which are no more than 15 characters long, and unique?
  241.  
  242.    2.  Is the first record located in the second row of your
  243.        database block?
  244.  
  245.    3.  Does each field in the database consist of a column of
  246.        labels or a column of values (make sure they are not
  247.        mixed)?
  248.  
  249.    4.  Have you issued the command </><Database><Query><Assign
  250.        Names> to establish the field names in your database?  If
  251.        you are unsure, or have changed any aspects of the
  252.        database, then issue this command again.
  253.  
  254.    5.  Have you indicated a criteria table using the
  255.        </><Database><Query><Criteria Table> command?
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  273. VERSION  :  ALL
  274.      OS  :  DOS
  275.    DATE  :  April 18, 1991                 PAGE  :  5/8
  276.  
  277.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  278.  
  279.  
  280.  
  281.  
  282.    6.  In your criteria table:
  283.  
  284.       a.  Does the first row contain field names which are
  285.           entered exactly like the field names in your
  286.           database?
  287.  
  288.       b.  Does each cell in the row(s) below the first row of
  289.           the criteria table contain one of the following:
  290.  
  291.           o  A Value, such as 123?
  292.  
  293.           o  A Label, such as Address?
  294.  
  295.           o  A Label containing a wildcard, such as ABC*?
  296.  
  297.           o  A Logical Search Formula which returns the
  298.              value 1 or 0, such as +SALES>300, or
  299.              +SALES>$A$1?  Make sure that all cell
  300.              addresses in the search formula which are
  301.              not field names are absolute cell addresses
  302.              (such as $A$1).
  303.  
  304.           o  An Empty Cell (tap on the Del key to make
  305.              sure a cell is empty)?  No row in your
  306.              criteria table should consist of only blank
  307.              cells, because if it does, you are telling
  308.              Quattro Pro to query ALL records in the
  309.              database.
  310.  
  311.    7.  If you are performing an Extract, Unique, or Delete
  312.        operation:
  313.  
  314.       a.  Have you used the </><Database><Query><Output
  315.           Block> command to indicate an output block?
  316.  
  317.    8.  Does the first row of your output block contain field
  318.        names which are spelled exactly like the field names in
  319.        your database?
  320.  
  321. If you are querying an external database (which is a Paradox,
  322. Reflex, or dBASE file which is not currently open in a Quattro
  323. Pro Window):
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  339. VERSION  :  ALL
  340.      OS  :  DOS
  341.    DATE  :  April 18, 1991                 PAGE  :  6/8
  342.  
  343.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  344.  
  345.  
  346.  
  347.  
  348.    1.  Is the database block linked to the database in the format
  349.        of [DATABASE]A1..A2?
  350.  
  351.    2.  Is the file a Paradox, Reflex, or dBASE file?
  352.  
  353.    3.  Are the field names in your search formulas linked to the
  354.        external database?  For example, +[DATABASE]SALES>300.
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  405. VERSION  :  ALL
  406.      OS  :  DOS
  407.    DATE  :  April 18, 1991                 PAGE  :  7/8
  408.  
  409.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  410.  
  411.  
  412.  
  413.  
  414.            Databasics Quick Reference:             
  415.  
  416.  
  417. Database Definitions
  418.  
  419.             The Database Block
  420.  
  421.               A         B    C      <───── Column
  422.       Letter
  423.           ╔═══════════════╦════╦══════════╗
  424.       1   ║NAME          ║AGE ║PHONE_NO  ║ <───── Field
  425.       Names (Note underscore)
  426.           ╠═══════════════╬════╬══════════╣
  427.       2   ║John Doe       ║12  ║000-0000  ║ <─────┐
  428.       3   ║Nick Derpich   ║24  ║111-1111  ║ <─────┼── Records
  429.       4   ║Wilhelm Stroup ║12  ║222-2222  ║ <─────┘
  430.       │   ╚═══════════════╩════╩══════════╝
  431.       │         │        │      │
  432.       │         │        │      │
  433.       │         └──────────┼─────────┘
  434.       │            │
  435.       │
  436.       └─── Row #         Fields
  437.  
  438. The database block above would be entered under
  439. </><Database><Query><Block> as A1..C4.
  440.  
  441.  
  442. Criteria Table Definitions
  443.  
  444.       A Criteria Table demonstrating a logical OR of two
  445.       criteria
  446.  
  447.            D           E       <─────  Column Letter
  448.           ╔═══════════╦═════╗
  449.       1   ║ NAME      ║ AGE ║ <───── The Field Names
  450.           ╠═══════════╬═════╣
  451.       2   ║John Doe   ║    ║ <───┐
  452.       3   ║           ║  0    ║ <───┴─ The Search Criteria
  453.       │   ╚═══════════╩═════╝
  454.       │             │
  455.       └─── Row #         │
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  471. VERSION  :  ALL
  472.      OS  :  DOS
  473.    DATE  :  April 18, 1991                 PAGE  :  8/8
  474.  
  475.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  476.  
  477.  
  478.  
  479.  
  480.                  └────────── This is the result of
  481.                      the formula +AGE>30,
  482.                      which is entered in this
  483.                      cell.    In some cases, it
  484.                      may return a 1,
  485.                      depending on what
  486.                      records you have in the
  487.                      database block.  Logical
  488.                      search formulas will
  489.                      always return a 1 or 0
  490.                      in the cell.
  491.  
  492. The above criteria table tells Quattro Pro to look for all
  493. records with the label John Doe in the field NAME, OR records
  494. where the value in the field AGE is greater than 30.  Note that
  495. the empty cells in this criteria table merely act as place
  496. holders, so that Quattro Pro does not think you wish to use some
  497. criteria in those cells.  This criteria table would be entered
  498. under </><Database><Query><Criteria Table> as D1..E3.
  499.  
  500.  
  501.       A Criteria Table demonstrating a logical AND of two
  502.       criteria
  503.  
  504.             D         E      <───── Column Letter
  505.           ╔═══════════╦═════╗
  506.       1   ║ NAME      ║ AGE ║ <───── The Field Names
  507.           ╠═══════════╬═════╣
  508.       2   ║John Doe   ║  1    ║ <───── The Search Criteria
  509.       │   ╚═══════════╩═════╝
  510.       │             │
  511.       └─── Row #         │
  512.                  └──────────     This is the result
  513.                          of the formula
  514.                          +AGE>30, which is
  515.                          entered in this
  516.                          cell.  In some
  517.                          cases, it may return
  518.                          a 0, depending on
  519.                          what records you
  520.                          have in the database
  521.                          block.  Logical
  522.                          search formulas will
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536. PRODUCT  :  QUATTRO PRO                            NUMBER  :  391
  537. VERSION  :  ALL
  538.      OS  :  DOS
  539.    DATE  :  April 18, 1991                 PAGE  :  9/8
  540.  
  541.   TITLE  :  DATABASICS: TROUBLESHOOTING DATABASE APPLICATIONS
  542.  
  543.  
  544.  
  545.  
  546.                          always return a 1 or
  547.                          0 in the cell.
  548.  
  549. The above criteria table tells Quattro Pro to look for all
  550. records with the label John Doe in the field NAME, AND values in
  551. the field AGE which are greater than 30.  It would be entered
  552. under </><Database><Query><Criteria Table> as D1..E2.
  553.  
  554.  
  555.       A Criteria Table demonstrating a logical OR of multiple
  556.       criteria
  557.  
  558.             D        <────── Column Letter
  559.           ╔═══════════╗
  560.       1   ║ NAME      ║ <────── The Field Name
  561.           ╠═══════════╣
  562.       2   ║John Doe   ║ <────┐
  563.       3   ║Jane Grey  ║ <────┤
  564.       4   ║Bill Dill  ║ <────┤
  565.       5   ║Joe No      ║ <────┴─ The Search Criteria
  566.       │   ╚═══════════╝
  567.       │
  568.       └─── Row #
  569.  
  570. The above criteria table tells Quattro Pro to look for all
  571. records with the label John Doe, Jane Grey, Bill Dill, OR Joe No
  572. in the field NAME.  It would be entered under
  573. </><Database><Query><Criteria Table> as D1..D5.
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.